package view.transitions;

import java.awt.image.BufferedImage;

public class SlideFromRight extends Animator {

	public SlideFromRight(BufferedImage from, BufferedImage to) {
		super(from, to);
	}

	@Override
	public void animate() {
		this.currentFrame++;
		this.overlayPosition.x = this.overlay.getWidth() - this.overlay.getWidth() * this.currentFrame / Animator.MAX_FRAMES;
	}

}
